package com.sn.author.service.impl;

import com.sn.author.common.context.SpringContext;
import com.sn.author.monitor.msg.entity.TaskPushMessage;
import com.sn.author.monitor.msg.eventModel.TaskMessageEvent;
import com.sn.author.service.dao.PushMessageService;
import org.springframework.stereotype.Service;

/**
 * @Author xiaom
 * @Date 2020/9/22 19:24
 * @Version 1.0.0
 * @Description <>
 **/
@Service
public class PushMessageServiceImpl implements PushMessageService {


    @Override
    public void pushMessage(TaskPushMessage taskPushMessage) {
        SpringContext.getApplicationContext().publishEvent(new TaskMessageEvent(this,taskPushMessage));
    }
}
